package interfaz;

import java.awt.*;
import javax.swing.*;

public class Menu2 extends JPanel {

    static final public int alto = 400;
    static final public int ancho = 300;
    static final private int altoBoton = 50;
    static final private int anchoBoton = 180;
    JButton retornar = new JButton("Return Game");
    JButton abrir = new JButton("Load Game");
    JButton guardar = new JButton("Save Game");
    JButton salir = new JButton("End Game");

    public Menu2() {
        this.setLayout(null);
        this.setBorder(BorderFactory.createLineBorder(Color.blue));

        guardar.setSize(anchoBoton, altoBoton);
        guardar.setLocation(ancho / 2 - anchoBoton / 2, alto / 4);

        abrir.setSize(anchoBoton, altoBoton);
        abrir.setLocation(ancho / 2 - anchoBoton / 2, alto / 4 + altoBoton);

        salir.setSize(anchoBoton, altoBoton);
        salir.setLocation(ancho / 2 - anchoBoton / 2, alto / 4 + 2 * (altoBoton));

        retornar.setSize(anchoBoton, altoBoton);
        retornar.setLocation(ancho / 2 - anchoBoton / 2, alto / 4 + 4 * (altoBoton));

        guardar.setBackground(Color.GRAY);
        abrir.setBackground(Color.GRAY);
        salir.setBackground(Color.GRAY);
        retornar.setBackground(Color.GRAY);

        guardar.setBorder(BorderFactory.createLineBorder(Color.blue));
        abrir.setBorder(BorderFactory.createLineBorder(Color.blue));
        salir.setBorder(BorderFactory.createLineBorder(Color.blue));
        retornar.setBorder(BorderFactory.createLineBorder(Color.blue));

        add(retornar);
        add(abrir);
        add(guardar);
        add(salir);

        setVisible(false);

    }

    public void paintComponent(Graphics g) {
        super.paintComponents(g);
        g.drawImage(Imagenes.fondo_matrix, 0, 0, null);
    }

    public JButton getRetornar() {
        return retornar;
    }

    public JButton getAbrir() {
        return abrir;
    }

    public JButton getGuardar() {
        return guardar;
    }

    public JButton getSalir() {
        return salir;
    }
}
